<?php

namespace app\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;
use Workerman\Autoloader;
use Workerman\Worker;

class Http extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('http');
        // 设置参数
        
    }

    protected function execute(Input $input, Output $output)
    {
    	// 指令输出
       $http_worker = new Worker("http://0.0.0.0:1111");
        $http_worker->onMessage=function($connect,$data){
            $connect->send("Hello Workman Http");
        };
        Worker::runAll();
    }
}
